package com.twu.biblioteca.Models;


import java.util.ArrayList;
import java.util.List;

public class MovieManager {

    private List<Movie> movieList;

    public MovieManager() {
        movieList = new ArrayList<Movie>();
        Movie tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Sholay", 1975, "Ramesh Sippy", -1);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);
        tmp = new Movie("Pulp Fiction", 1994, "Quentin Tarantino", 9);
        movieList.add(tmp);

    }

    public List<Movie> getMovieList() {
        return movieList;
    }

    public String showMovies() {
        String movies = "Movie\t\t\tYear\t\tDirector\t\t\tRating\n\n";
        for (Movie movie : getMovieList()) {
            movies += movie.convertToString();
            movies += "\n";
        }
        return movies;
    }

}
